<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>轮回之牢: MobAI类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">轮回之牢<span id="projectnumber">&#160;0.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="class_mob_a_i-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">MobAI类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>控制怪物AI的类  
 <a href="class_mob_a_i.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_mob_a_i_8h_source.html">MobAI.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:acd4651c5d1e38b34aaee84ae46d80a12"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mob_a_i.html#acd4651c5d1e38b34aaee84ae46d80a12">MobAI</a> (<a class="el" href="class_base_mob.html">BaseMob</a> *mob)</td></tr>
<tr class="memdesc:acd4651c5d1e38b34aaee84ae46d80a12"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造函数  <a href="class_mob_a_i.html#acd4651c5d1e38b34aaee84ae46d80a12">更多...</a><br /></td></tr>
<tr class="separator:acd4651c5d1e38b34aaee84ae46d80a12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56b35ba83947d6699050a5a29d27e3c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_actor_1_1_move___type.html">Actor::Move_Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mob_a_i.html#a56b35ba83947d6699050a5a29d27e3c7">stayOnBrick</a> (<a class="el" href="class_base_object.html">BaseObject</a> *object) const</td></tr>
<tr class="memdesc:a56b35ba83947d6699050a5a29d27e3c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">控制怪物在单一砖块上巡逻  <a href="class_mob_a_i.html#a56b35ba83947d6699050a5a29d27e3c7">更多...</a><br /></td></tr>
<tr class="separator:a56b35ba83947d6699050a5a29d27e3c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc302b9921588260e8693c4716aa590d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_actor_1_1_move___type.html">Actor::Move_Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mob_a_i.html#abc302b9921588260e8693c4716aa590d">chasePlayer</a> (<a class="el" href="class_base_player.html">BasePlayer</a> *player, bool &amp;attack) const</td></tr>
<tr class="memdesc:abc302b9921588260e8693c4716aa590d"><td class="mdescLeft">&#160;</td><td class="mdescRight">控制怪物追逐玩家  <a href="class_mob_a_i.html#abc302b9921588260e8693c4716aa590d">更多...</a><br /></td></tr>
<tr class="separator:abc302b9921588260e8693c4716aa590d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1f2ae30a34d1d7e783be7481d2e9ffa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_actor_1_1_move___type.html">Actor::Move_Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mob_a_i.html#ad1f2ae30a34d1d7e783be7481d2e9ffa">runAI</a> (<a class="el" href="class_base_object.html">BaseObject</a> *mob_stand, <a class="el" href="class_base_player.html">BasePlayer</a> *player, bool *attack) const</td></tr>
<tr class="memdesc:ad1f2ae30a34d1d7e783be7481d2e9ffa"><td class="mdescLeft">&#160;</td><td class="mdescRight">执行AI  <a href="class_mob_a_i.html#ad1f2ae30a34d1d7e783be7481d2e9ffa">更多...</a><br /></td></tr>
<tr class="separator:ad1f2ae30a34d1d7e783be7481d2e9ffa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p >控制怪物AI的类 </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="acd4651c5d1e38b34aaee84ae46d80a12" name="acd4651c5d1e38b34aaee84ae46d80a12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acd4651c5d1e38b34aaee84ae46d80a12">&#9670;&nbsp;</a></span>MobAI()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">MobAI::MobAI </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_base_mob.html">BaseMob</a> *&#160;</td>
          <td class="paramname"><em>mob</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>构造函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">mob</td><td>被操控的怪物类指针 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="abc302b9921588260e8693c4716aa590d" name="abc302b9921588260e8693c4716aa590d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc302b9921588260e8693c4716aa590d">&#9670;&nbsp;</a></span>chasePlayer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_actor_1_1_move___type.html">Actor::Move_Type</a> MobAI::chasePlayer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_base_player.html">BasePlayer</a> *&#160;</td>
          <td class="paramname"><em>player</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool &amp;&#160;</td>
          <td class="paramname"><em>attack</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>控制怪物追逐玩家 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">player</td><td>需要追逐的玩家 </td></tr>
    <tr><td class="paramname">attack</td><td>是否攻击玩家 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="ad1f2ae30a34d1d7e783be7481d2e9ffa" name="ad1f2ae30a34d1d7e783be7481d2e9ffa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1f2ae30a34d1d7e783be7481d2e9ffa">&#9670;&nbsp;</a></span>runAI()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_actor_1_1_move___type.html">Actor::Move_Type</a> MobAI::runAI </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_base_object.html">BaseObject</a> *&#160;</td>
          <td class="paramname"><em>mob_stand</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_base_player.html">BasePlayer</a> *&#160;</td>
          <td class="paramname"><em>player</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>attack</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>执行AI </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">mob_stand</td><td>怪物所在的砖块 </td></tr>
    <tr><td class="paramname">player</td><td>场景内的玩家 </td></tr>
    <tr><td class="paramname">attack</td><td>是否执行攻击动作 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a56b35ba83947d6699050a5a29d27e3c7" name="a56b35ba83947d6699050a5a29d27e3c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56b35ba83947d6699050a5a29d27e3c7">&#9670;&nbsp;</a></span>stayOnBrick()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_actor_1_1_move___type.html">Actor::Move_Type</a> MobAI::stayOnBrick </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_base_object.html">BaseObject</a> *&#160;</td>
          <td class="paramname"><em>object</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>控制怪物在单一砖块上巡逻 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">object</td><td>需要的砖块 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="class_mob_a_i_a56b35ba83947d6699050a5a29d27e3c7_cgraph.png" border="0" usemap="#aclass_mob_a_i_a56b35ba83947d6699050a5a29d27e3c7_cgraph" alt=""/></div>
<map name="aclass_mob_a_i_a56b35ba83947d6699050a5a29d27e3c7_cgraph" id="aclass_mob_a_i_a56b35ba83947d6699050a5a29d27e3c7_cgraph">
<area shape="rect" title="控制怪物在单一砖块上巡逻" alt="" coords="5,107,144,133"/>
<area shape="rect" href="class_actor.html#a2dea4d3df5f9ad75038fee99e820f2e7" title="获取位置" alt="" coords="220,5,323,32"/>
<area shape="rect" href="class_base_object.html#a7e176d1d960045fc200077eca43965e5" title="获取物体位置" alt="" coords="202,56,341,83"/>
<area shape="rect" href="class_actor.html#ac6bf16355014a92d0feb17bae987467f" title="X方向最大速度" alt="" coords="192,107,351,133"/>
<area shape="rect" href="class_actor.html#a3b8f6189dfcbd3f5efd9d6437ff2a47e" title="获取宽度" alt="" coords="215,157,328,184"/>
<area shape="rect" href="class_base_object.html#aa6b51f6eda42de15bbcf9b0c4fb1db51" title="获取物体宽度，单位:像素" alt="" coords="196,208,347,235"/>
</map>
</div>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>D:/Code/cProgram/CPP/Qt/TeamCurriculumDesign/AI/<a class="el" href="_mob_a_i_8h_source.html">MobAI.h</a></li>
<li>D:/Code/cProgram/CPP/Qt/TeamCurriculumDesign/AI/MobAI.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2
</small></address>
</body>
</html>
